import 'package:appupgrade/app_market.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

import 'appupgrade_method_channel.dart';

abstract class AppupgradePlatform extends PlatformInterface {
  /// Constructs a AppupgradePlatform.
  AppupgradePlatform() : super(token: _token);

  static final Object _token = Object();

  static AppupgradePlatform _instance = MethodChannelAppupgrade();

  /// The default instance of [AppupgradePlatform] to use.
  ///
  /// Defaults to [MethodChannelAppupgrade].
  static AppupgradePlatform get instance => _instance;

  /// Platform-specific implementations should set this with their own
  /// platform-specific class that extends [AppupgradePlatform] when
  /// they register themselves.
  static set instance(AppupgradePlatform instance) {
    PlatformInterface.verifyToken(instance, _token);
    _instance = instance;
  }

  //for iOS
  Future toAppStore(String id) async {

  }


  //for Android
  Future installAppForAndroid(String path) async {

  }

  //for Android
  Future<List<String>> getInstallMarket({List<String>? marketPackageNames}) async {
    throw("getInstallMarket not found");
  }

  //for Android
  Future toMarket({required AppMarketInfo appMarketInfo}) async {

  }

  //for windows
  Future installAppForWindows(String path) async{

  }

  //for macos
  Future installAppForMac(String path) async{

  }

}
